package com.aacar.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.aacar.dao.BrandDao;
import com.aacar.dao.base.CommonBaseDao;
import com.aacar.entity.PageEntity;
import com.aacar.vo.AllBrandVo;
import com.aacar.vo.BrandVo;
import com.aacar.vo.HotBrandVo;

@Repository("brandDao")
public class BrandDaoImpl extends CommonBaseDao implements BrandDao {
	
	private static final String nameSpace = "com.aacar.dao.BrandDao.";
	
	//获取热门品牌
	public List<HotBrandVo> getHotBrandVo() {
		return super.getSqlSession().selectList(nameSpace+"getHotBrandVo");
	}
	
	//获取所有品牌
	public List<AllBrandVo> getAllBrandVo(PageEntity page) {
		return super.getSqlSession().selectList(nameSpace+"getAllBrandVo",page);
	}
	
	//获取所有品牌数量
	public int getAllBrandCount() {
		return super.getSqlSession().selectOne(nameSpace+"getAllBrandCount");
	}

	@Override
	public BrandVo getAllBrandByBrandId(String brandId) {
		return super.getSqlSession().selectOne(nameSpace+"getAllBrandByBrandId",brandId);
	}
	
	
	
}
